import java.util.Scanner;

public class test6 {
    public static void main(String[] args) {
         Scanner sc = new Scanner(System.in);
         double a = sc.nextDouble();
         double b = sc.nextDouble();
         double c = sc.nextDouble();
         int d = sc.nextInt();
         int e = sc.nextInt();
        System.out.println(max(a,b,c));
        System.out.println(max(d,e));
    }
    //法1
    public static int max(int a, int b) {
        if(a>b) {
            return a;
        }
        return b;
    }
    public static double max(double a, double b, double c) {
        double m = a > b ? a : b;
        return m > c ? m : c;

    }
    //法2 利用原生类Math
    /*public static int max2(int a,int b) {
        return a > b ? a:b;
    }

    public static int max3(int a,int b,int c) {
        int max = max2(a,b);
        return max > c ? max : c;
    }
    public static void main(String[] args) {
        System.out.println(max3(2, 5, 1));
    }*/


}
